package cn.topevery.garden.entity.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import hw.topevery.framework.Utility;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.ObjectUtils;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 *  视图
 *
 * @author code-generate
 * @date 2021-09-01
 */
@Data
@ApiModel(value = "CurrStatusCar 视图", description = " 视图")
public class CurrStatusCarVO implements Serializable{
    /**
     * 自增id
     */
    private Integer id;

        /**
     * 
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private String carId;

    /**
     * 
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private String number;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private String carType;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer gpsId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private String clientKey;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private String sectionName;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer onlineType;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer onguardType;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer workType;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer onlineTime;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer validTime;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer type;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private LocalDateTime lastOnlineDate;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double geoX;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double geoY;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double absX;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double absY;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer mileage;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private String sectionId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double speed;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer accState;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private LocalDateTime gpsDate;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer sectionAreaId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer isInSection;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer isSectionArea;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private String onguardDesc;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer onguardTime;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer isAct10m;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer lastActType;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer validMileage;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer onguardState;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private LocalDateTime workBeginTime;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private LocalDateTime workEndTime;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer workAreaId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private LocalDateTime onguardDate;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer workMileage;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer workIsValid;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer isWorkLine;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer workLineId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Integer carWorkStatus;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double inSectionUseWater;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double outSectionUseWater;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @Excel(name = "", orderNum = "0")
    private Double totalWater;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Excel(name = "创建时间", orderNum = "0")
    private LocalDateTime dbCreateDate;

    /**
     *  对应t_sys_user.c_id
     */
    @ApiModelProperty(value = " 对应t_sys_user.c_id")
    @Excel(name = " 对应t_sys_user.c_id", orderNum = "0")
    private Integer dbCreateId;

    /**
     * 最后更新时间
     */
    @ApiModelProperty(value = "最后更新时间")
    @Excel(name = "最后更新时间", orderNum = "0")
    private LocalDateTime dbLastUpdateDate;

    /**
     *  对应t_sys_user.c_id
     */
    @ApiModelProperty(value = " 对应t_sys_user.c_id")
    @Excel(name = " 对应t_sys_user.c_id", orderNum = "0")
    private Integer dbLastUpdateId;

//    @ApiModelProperty(value = "设备编号")
//    private String deviceCode;
//
    @ApiModelProperty(value = "")
    private String onlineTimeString;
    public String getOnlineTimeString() {
        return Utility.GetTimeString(onlineTime);
    }

    public void setOnlineTimeString(String lastMinutes) {
        this.onlineTimeString = lastMinutes;
    }

    @ApiModelProperty(value = "")
    private String validTimeString;
    public String getValidTimeString() {
        if(ObjectUtils.isEmpty(validTime)){
            validTime=0;
        }
        return Utility.GetTimeString(validTime);
    }

    public void setValidTimeString(String lastMinutes) {
        this.validTimeString = lastMinutes;
    }

}
